<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AppendCityToBannerTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('banner', function (Blueprint $table) {
            //
            $table->integer('province_id')->comment('省级ID');
            $table->string('province_name',50)->comment('省级名称');
            $table->integer('city_id')->comment('城市ID');
            $table->string('city_name',50)->comment('城市名称');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('banner', function (Blueprint $table) {
            //
            $table->dropColumn(['province_id','province_name','city_id','city_name']);
        });
    }
}
